<template>
    <div class="children">
        <!-- {{ childrenList }} -->
        <ul>
            <li v-for="item in childrenList" :key="item.cat_id">
                <h3>{{ item.cat_name }}</h3>
                <van-grid :column-num="3">
                    <van-grid-item v-for="value in item.children" :key="value" :icon="value.cat_icon" :text="value.cat_name"/>
                </van-grid>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    props: ['childrenList'],
}
</script>

<style lang="less" scoped>
.children {
  height: 100vh;    /* 必须给高度 */
  overflow-y: auto; /* 关键：独立滚动条 */
  flex: 1;          /* 占剩余宽 */
}
</style>